package com.bkgy.modular.tborderthkalert.controller;

import com.alibaba.fastjson.JSONObject;
import com.bkgy.modular.tborderthkalert.service.TbOrderThkAlertService;
import com.bkgy.sys.common.entity.ResultData;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * Author:Lipeng Zhao
 * Description:
 *
 * @Date:Created In 15:38 2025/11/4
 */
@RestController
@RequestMapping("/tbOrderThkAlert")
public class TbOrderThkAlertController {


    @Autowired
    private TbOrderThkAlertService tbOrderThkAlertService;

    /**
     * 按照订货厚度、订货宽度、钢种、客户名称分档查询
     * @param
     */
    @CrossOrigin
    @RequestMapping(value = {"/findByCondition"}, method = RequestMethod.POST)
    @ResponseBody
    public ResultData findByCondition(@RequestBody JSONObject jsonObject) {
        return tbOrderThkAlertService.findByCondition(jsonObject);
    }

    @CrossOrigin
    @RequestMapping(value = {"/findDataByCondition"}, method = RequestMethod.POST)
    @ResponseBody
    public ResultData findDataByCondition(@RequestBody JSONObject jsonObject) {
        return tbOrderThkAlertService.findDataByCondition(jsonObject);
    }

    @CrossOrigin
    @RequestMapping(value = {"/findCal1630DataByCondition"}, method = RequestMethod.POST)
    @ResponseBody
    public ResultData findCal1630DataByCondition(@RequestBody JSONObject jsonObject) {
        return tbOrderThkAlertService.findCal1630DataByCondition(jsonObject);
    }

    @CrossOrigin
    @RequestMapping(value = {"/findCGLDataByCondition"}, method = RequestMethod.POST)
    @ResponseBody
    public ResultData findCGLDataByCondition(@RequestBody JSONObject jsonObject) {
        return tbOrderThkAlertService.findCGLDataByCondition(jsonObject);
    }

}
